



<extend name="Public/base"/>
<block name="body">
    <form class="well form-inline " method="get" action="">









        <div class="form-group">

            <input type="text" class="input length_2" name="keyword" style="width:200px;" value="{:I('get.keyword')}" placeholder="请输入关键字...">
        </div>
        <div class="form-group">
            <button class="btn btn-xs btn-info" data-toggle="tooltip" title="搜索">
                <i class="icon-search bigger-110"></i>


            </button>

            <a  data-toggle="tooltip" title="清除搜索项"  href="{:U(index)}" class="tooltip-danger btn btn-xs btn-danger"><i class="icon-remove bigger-110"></i></a>
        </div>


        </div>
    </form>

    <form class="J_ajaxForm" action="" method="post">
        <div class="table_list">
            <table class="table table-striped  table-hover" >
                <thead>
                <tr>
                    <th width="16"><label><input type="checkbox" class="check-all"></label></th>
                    <th width="50">排序</th>
                    <th width="30px">ID</th>
                    <th width="40px">荐</th>
                    <th width="40px">顶</th>
                    <th width="40px">新</th>

                    <th>标题</th>
                    <th>规格</th>
                    <th width="180">价格</th>
                    <th width="60">状态</th>
                    <th width="60">库存</th>
                    <th width="160">操作</th>
                </tr>
                </thead>

                <foreach name="list" item="vo">
                    <tr>
                        <td><input type="checkbox" class="ids"  name="ids[]" value="{$vo.id}" ></td>
                        <td><input name='listorders[{$vo.id}]' class="input input-order"  type='text' size='3' value='{$vo.listorder}'></td>
                        <td><a>{$vo.id}</a></td>
                        <td>  <if condition="$vo[tui] eq 1">
                            <a href="{:U("change",array("id"=>$vo['id'],"field"=>"tui","value"=>0))}" class="ajax-switch"> <i class="icon-check-circle"></i></a>
                            <else/>
                            <a href="{:U("change",array("id"=>$vo['id'],"field"=>"tui","value"=>1))}"  class="ajax-switch"><i class="icon-times-circle"></i></a>
                        </if></td>
                        <td>  <if condition="$vo[top] eq 1">
                            <a href="{:U("change",array("id"=>$vo['id'],"field"=>"top","value"=>0))}" class="ajax-switch"> <i class="icon-check-circle"></i></a>
                            <else/>
                            <a href="{:U("change",array("id"=>$vo['id'],"field"=>"top","value"=>1))}"  class="ajax-switch"><i class="icon-times-circle"></i></a>
                        </if></td>

                        <td>  <if condition="$vo['new'] eq 1">
                            <a href="{:U("change",array("id"=>$vo['id'],"field"=>"new","value"=>0))}" class="ajax-switch"> <i class="icon-check-circle"></i></a>
                            <else/>
                            <a href="{:U("change",array("id"=>$vo['id'],"field"=>"new","value"=>1))}"  class="ajax-switch"><i class="icon-times-circle"></i></a>
                        </if></td>



                        <td>

                                <span>{$vo.title}</span>
                          <p>{:U('Home/Product/show',array('id'=>$vo['id']),true,true)}</p>


                        </td>
                        <td>{$vo.guigex}</td>
                        <td>{$vo.price}</td>


                        <td><if condition="$vo[status] eq 1"> <a href="{:U("changestatus",array("id"=>$vo['id']))}" class="ajax-switch"> <i class="icon-check-circle"></i></a>
                            <else/>
                            <a href="{:U("changestatus",array("id"=>$vo['id']))}"  class="ajax-switch"><i class="icon-times-circle"></i></a> </if></td>

                        <td>

                            {$vo.kucun}
                        </td>

                        <td>


                            <!--	<a href="javascript:open_iframe_dialog('{:u('comment/commentadmin/index',array('post_id'=>$vo['id']))}','评论列表')">查看评论</a> |-->
                            <a href="{:U('edit',array('id'=>$vo['id']))}">修改</a>|
                            <a href="{:U('delete',array('id'=>$vo['id']))}" class="ajax-del" >删除</a>
                        </td>
                    </tr>
                </foreach>
            </table>
            <div class="pagination">{$Page}</div>

        </div>
        <div class="form-actions">

            <button class="btn btn-primary ajax-post" type="submit" url="{:U('listorders')}" target-form="J_ajaxForm">排序</button>


            <button class="btn btn-primary ajax-post confirm" type="submit" url="{:U('delete')}" target-form="J_ajaxForm"   data-title="你确定删除吗？">删除</button>

        </div>
    </form>



</block>


<block name="script">

</block>